from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
                       url(r'^$', 'HIT.Triangulator.views.home', name='home'),
                       url(r'^home/$', 'HIT.Triangulator.views.home', name='home'),
                       
                       url(r'^js/(?P<file>[a-zA-Z0-9_\.]+)$', 'HIT.Triangulator.views.javascript', name='javascript'),
                       
                       # Triangulation of thesis
                       url(r'^starttriangulation/$', 'HIT.Triangulator.views.start_triangulation', name='Start Triangulation'),
                       url(r'^queryorselect/$', 'HIT.Triangulator.views.query_or_select', name='Query or Select'),
                       url(r'^datatriangulation/$', 'HIT.Triangulator.views.data_triangulation', name='Data Triangulation'),
                       url(r'^investigatortriangulation/$', 'HIT.Triangulator.views.investigator_triangulation', name='Investigator Triangulation'),
                       url(r'^investigatortriangulationresults/$', 'HIT.Triangulator.views.investigator_triangulation_results', name='Investigator Triangulation Results'),
                       url(r'^theorytriangulation/$', 'HIT.Triangulator.views.theory_triangulation', name='Theory Triangulation'),
                       url(r'^methodtriangulation/$', 'HIT.Triangulator.views.method_triangulation', name='Method Triangulation'),
                       url(r'^thesistriangulatesummary/$', 'HIT.Triangulator.views.thesis_triangulate_summary', name='Thesis Triangulate Summary'),
                       url(r'^savereliabilitycontinue/$', 'HIT.Triangulator.views.save_reliability_continue_antithesis', name='Save Reliability and continue with antithesis'),
                       url(r'^savereliability/$', 'HIT.Triangulator.views.save_reliability_stop', name='Save Reliability and stop'),
                       url(r'^modifythesis/$', 'HIT.Triangulator.views.modify_thesis', name='Modify Thesis'),
                       
                       # Triangulation of antithesis
                       url(r'^starttriangulationantithesis/$', 'HIT.Triangulator.views.start_triangulation_antithesis', name='Start Triangulation Antithesis'),
                       url(r'^queryorselectantithesis/$', 'HIT.Triangulator.views.query_or_select_antithesis', name='Query or Select Antithesis'),
                       url(r'^datatriangulationantithesis/$', 'HIT.Triangulator.views.data_triangulation_antithesis', name='Data Triangulation Antithesis'),
                       url(r'^investigatortriangulationantithesis/$', 'HIT.Triangulator.views.investigator_triangulation_antithesis', name='Investigator Triangulation Antithesis'),
                       url(r'^investigatortriangulationresultsantithesis/$', 'HIT.Triangulator.views.investigator_triangulation_results_antithesis', name='Investigator Triangulation Results Antithesis'),
                       url(r'^theorytriangulationantithesis/$', 'HIT.Triangulator.views.theory_triangulation_antithesis', name='Theory Triangulation Antithesis'),
                       url(r'^methodtriangulationantithesis/$', 'HIT.Triangulator.views.method_triangulation_antithesis', name='Method Triangulation Antithesis'),
                       url(r'^antithesistriangulatesummary/$', 'HIT.Triangulator.views.antithesis_triangulate_summary', name='Antithesis Triangulate Summary'),
                       url(r'^savesynthesis/$', 'HIT.Triangulator.views.save_synthesis', name='Save synthesis'),
                       
                       url(r'^triangulatesummary/$', 'HIT.Triangulator.views.triangulate_summary', name='Triangulation Summary'),
                       url(r'^triangulateresult/(?P<id>\d+)$', 'HIT.Triangulator.views.triangulate_result', name='Triangulate Result'),
                       url(r'^deletetriangulation/(?P<id>\d+)$', 'HIT.Triangulator.views.delete_triangulation', name='Delete Triangulation'),
                       
                       url(r'^helptext/(?P<name>\w+)/$', 'HIT.Triangulator.views.helptext', name='Help document'),
                       
                       # Ajax methods
                       url(r'^addmethod/$', 'HIT.Triangulator.views.add_method', name='ajax add method'),
                       url(r'^metasearch/$', 'HIT.Triangulator.views.ajax_metasearch'),
                       
                       # Admin
                       #url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
                       url(r'^admin/', include(admin.site.urls)),
                       
                       #registration page
                       (r'^register/$', 'HIT.Triangulator.views.register'),
                       (r'^complete/$', 'HIT.Triangulator.views.complete'),
                       # Auth pages
                       (r'^logout/$', 'django.contrib.auth.views.logout_then_login'),
                       (r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}),
)
